﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace TrackSystem.EntityFramework.Migrations
{
    /// <inheritdoc />
    public partial class cm10 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "0d23293e-6d0f-42c5-ab1e-fc77d822f23c");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "2fbc2f91-71ed-4b39-afdc-508c57b23410");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "40c292dc-9d43-4712-bf8c-855a70d00cc8");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "7ebc0479-e633-4f12-a8cf-50ee9c9abe72");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "c5436f2d-08f9-4f2c-814c-091f759039b7");

            migrationBuilder.AlterColumn<string>(
                name: "Value",
                table: "Alarm",
                type: "longtext",
                nullable: false,
                oldClrType: typeof(double),
                oldType: "double")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<DateTime>(
                name: "createDt",
                table: "Alarm",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.InsertData(
                table: "AspNetRoles",
                columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
                values: new object[,]
                {
                    { "1f43f2ad-3881-43ca-ac7d-87ce63def8bb", null, "Admin", "ADMIN" },
                    { "2e3c9f97-8240-415b-8ecb-b7581a87f975", null, "Op", "Operator" },
                    { "b377bf4e-a38f-4ba1-a383-41c1052a0c54", null, "Guest", "Guest" },
                    { "cd3a9b96-b553-4e6e-8d8b-ae4d07171b2e", null, "Eng", "Engineer" },
                    { "d5cb7cd0-82bb-4091-8711-7ad97adb930f", null, "User", "User" }
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "1f43f2ad-3881-43ca-ac7d-87ce63def8bb");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "2e3c9f97-8240-415b-8ecb-b7581a87f975");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "b377bf4e-a38f-4ba1-a383-41c1052a0c54");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "cd3a9b96-b553-4e6e-8d8b-ae4d07171b2e");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: "d5cb7cd0-82bb-4091-8711-7ad97adb930f");

            migrationBuilder.DropColumn(
                name: "createDt",
                table: "Alarm");

            migrationBuilder.AlterColumn<double>(
                name: "Value",
                table: "Alarm",
                type: "double",
                nullable: false,
                oldClrType: typeof(string),
                oldType: "longtext")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.InsertData(
                table: "AspNetRoles",
                columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
                values: new object[,]
                {
                    { "0d23293e-6d0f-42c5-ab1e-fc77d822f23c", null, "Admin", "ADMIN" },
                    { "2fbc2f91-71ed-4b39-afdc-508c57b23410", null, "Eng", "Engineer" },
                    { "40c292dc-9d43-4712-bf8c-855a70d00cc8", null, "Op", "Operator" },
                    { "7ebc0479-e633-4f12-a8cf-50ee9c9abe72", null, "User", "User" },
                    { "c5436f2d-08f9-4f2c-814c-091f759039b7", null, "Guest", "Guest" }
                });
        }
    }
}
